package com.wlyuan.open.scanner.utils.enums.order;

import com.wlyuan.core.marker.NamedValue;
import com.wlyuan.core.marker.NamedValueMap;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * @author lijing
 * @description 新老系统订单签收类型
 */
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public enum OrderCreateTypeEnum implements NamedValue<Integer> {

    PC(0, 10, "PC平台手动创建"),
    MOBILE(1, 11, "移动端创建"),
    PRE(2, 12, "预发货"),
    ORDER_IMPORT(3, 13, "订单导入"),
    OPEN_API(4, 14, "新api对接"),
    JIA(5, 15, "加加同步订单"),
    QF(6, 16, "起帆同步订单"),
    TOP(7, 22, "top同步订单"),
    ELECTRONIC(9, 19, "电子回单创建"),
    QZ(10, 20, "奇正同步订单"),
    HWJ(11, 21, "浩嘉维同步订单"),
    ;

    private final Integer value;
    private final Integer newValue;
    private final String name;


    private static final Map<Integer, OrderCreateTypeEnum> MAP = new NamedValueMap<>(OrderCreateTypeEnum.class);

    public static OrderCreateTypeEnum fromValue(Integer value) {
        return MAP.get(value);
    }
}
